﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using MyCompanyName.AbpZeroTemplate.Prm.Document.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;

namespace MyCompanyName.AbpZeroTemplate.Prm.Document
{
    public interface IDocumentAppService : IApplicationService
    {

        List<GetDocumentCheckedTreeDto> GetDocumentTree([FromUri]int projectId);
        List<GetDocumentTreeDto> GetProjectDocumentTree([FromUri]int projectId);
        List<GetDocumentTreeDto> GetDocumentReportColumn();
        Task SetProjectDocumentType(SetProjectDocumentTypeInPut input);
        Task UploadDocument();
        Task _UploadDocument(string typeId, string projectId, string fileName, string taskId, string reportDate, string note,  HttpPostedFileBase uploadFile);
        Task _UploadDowumnets(HttpPostedFileBase file, string typeId, string projectId, string StepName);
        Task UploadDocuments();
        Task UploadAttachment();
        Task _UploadAttachment(string projectId, string fileName, string note, HttpPostedFileBase file, string tags);
        PagedResultOutput<GetDocumentOutPut> GetDocument([FromUri]int typeId, string stepname, int projectId, bool isDelete, string documentName, string tag, int createId = 0, bool hasAuth = true, int start = 0, int limit = 25);
        //List<GetDocumentOutPut> GetWeekDocument([FromUri]int projectId);
        List<GetDocumentOutPut> GetWeekDocument(List<int> pids);
        int GetDocumentCount([FromUri]int projectId);
        int GetDocumentCount([FromUri]int projectId, DateTime dts);
        List<GetDocumentVersionOutPut> GetDocumentVersion([FromUri]int documentId);
        Task RemoveDocument([FromUri]int documentId, int projectId);
        Task ERemoveDocuments(List<int> documentIds);

        Task EditDocument();
        Task GetFile([FromUri]string path);
        Task GetFileView([FromUri]string path);
        Task<GetDocumentOutPut> Get([FromUri]int documentId);
        GetUploadFileOutPut UploadFile();
        GetUploadFileOutPut UploadFile(HttpPostedFileBase baseFile);
        //Task CreateTag(CreateTagInPut input);
        List<KeyValuePair<string, int>> GetProjectTag([FromUri]int projectId);
        List<GetFileTagOutPut> GetDocumentTag([FromUri]int projectId);
        Task GetFixedVersion([FromUri]int documentId);
        Task SetDocumentTag(SetDocumentTagInPut input);

        Task RemoveDocumentVersion([FromUri]int versionId);

        Task AddDocShare(DocShareInput input);
        List<DocShareOutput> GetDocumentShare([FromUri]int docId);
        Task EndDocShare([FromUri]int shareId);
    }
}
